import request from "@/utils/request";

/**
 * 监控设备查询
 * @param data
 * @returns {AxiosPromise<AxiosResponse<any>>}
 */
export function list(data) {
  return request({
    url: '/system/mon/list',
    method: 'post',
    data: data
  })
}

export function facilityList(data) {
  return request({
    url: '/system/mon/list',
    method: 'post',
    data: data
  })
}

/**
 * 选择小区名称 下拉框
 * @returns {*}
 */
export function monList() {
  return request({
    url: '/system/mon/monList',
    method: 'get'
  })
}


/**
 * 监控设备添加
 * @param data
 * @returns {AxiosPromise<AxiosResponse<any>>}
 */
export function monAdd(data) {
  return request({
    url: '/system/mon/monAdd',
    method: 'post',
    data: data
  })
}


/**
 * 回显
 * @param monitoringId
 * @returns {AxiosPromise<AxiosResponse<any>>}
 */
export function echo(monitoringId) {
  return request({
    url: '/system/mon/echo/'+monitoringId,
    method: 'get',
    data: monitoringId
  })
}


/**
 * 批量删除
 * @param data
 * @returns {AxiosPromise<AxiosResponse<any>>}
 */
export function del(monitoringId) {
  return request({
    url: '/system/mon/del/'+monitoringId,
    method: 'post',
    data: monitoringId
  })
}
